Skip to content

FINERACT-2549: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign#5659

Open
Dpk376 wants to merge 1 commit intoapache:developfrom
Dpk376:feature/FINERACT-2441-feign-migration-clientexternalid
Open

FINERACT-2549: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign#5659
Dpk376 wants to merge 1 commit intoapache:developfrom
Dpk376:feature/FINERACT-2441-feign-migration-clientexternalid

Conversation

@Dpk376
Copy link
Copy Markdown
Contributor

@Dpk376 Dpk376 commented Mar 20, 2026

What this PR does

Migrates ClientExternalIdTest from the deprecated RestAssured-based helpers to the typed fineract-client-feign client, as part of FINERACT-2549.

Changes

  • ClientHelper: Added no-arg feign-based helper methods — addClientAsPerson(), getClientByExternalId(), updateClientByExternalId(), deleteClientByExternalId(), getClientAccounts(), getProposedTransferDate(), and getObligeeData() — using FineractClientHelper and Calls.ok()
  • ClientExternalIdTest: Removed all RestAssured boilerplate (requestSpec, responseSpec, getBasicClientAsJSON()); migrated all client create/get/update/delete calls to the new feign-based helpers; replaced manual JSON payload construction with typed request objects (e.g. PutClientsClientIdRequest)
  • SearchResourcesTest: Migrated addClientAsPerson calls to feign-based helpers
  • LoanAccountsContainsCurrencyFieldTest: Migrated addClientAsPerson and getClientAccounts calls to feign-based helpers
  • Deleted 8 deprecated @Deprecated(forRemoval = true) RestAssured methods from ClientHelper

Checklist

  • ./gradlew spotlessApply passed
  • ./gradlew :integration-tests:compileTestJava passed
  • No new RestAssured dependencies introduced

Part of FINERACT-2549
Related to FINERACT-2454

gsoc-fineract-evidence

@Dpk376 Dpk376 changed the title Migrate ClientExternalIdTest from RestAssured to fineract-client FINERACT-2441: Migrate ClientExternalIdTest from RestAssured to fineract-client Mar 20, 2026
@Dpk376 Dpk376 force-pushed the feature/FINERACT-2441-feign-migration-clientexternalid branch from 951ebad to 0133a7b Compare March 20, 2026 11:28
@Dpk376 Dpk376 changed the title FINERACT-2441: Migrate ClientExternalIdTest from RestAssured to fineract-client FINERACT-2454: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign Mar 20, 2026
@Dpk376 Dpk376 force-pushed the feature/FINERACT-2441-feign-migration-clientexternalid branch 3 times, most recently from bdd501e to 0f84a76 Compare March 20, 2026 12:13
@Dpk376 Dpk376 changed the title FINERACT-2454: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign FINERACT-2549: Migrate ClientExternalIdTest from RestAssured to fineract-client-feign Mar 21, 2026
@Dpk376 Dpk376 force-pushed the feature/FINERACT-2441-feign-migration-clientexternalid branch from 1f7b357 to 0397054 Compare March 24, 2026 11:56

// Close Client action
jsonPayload = clientHelper.getCloseClientAsJSON();
String jsonPayload = clientHelper.getCloseClientAsJSON();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WE dont need this anymore no? It should use fineract-client too!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and Replaced all new ClientHelper(requestSpec, responseSpec) usages and the deprecated performClientActionUsingExternalId calls with direct feign calls using the new static methods ClientHelper.closeClient(), ClientHelper.reactivateClient(), ClientHelper.rejectClient(), and ClientHelper.activateClient(). The PostClientsClientIdRequest model was also updated with the required fields (closureDate, closureReasonId, reactivationDate, rejectionDate, rejectionReasonId)

@Dpk376 Dpk376 force-pushed the feature/FINERACT-2441-feign-migration-clientexternalid branch 2 times, most recently from 9354c83 to 0ac8222 Compare March 27, 2026 14:18
…act-client-feign

- Migrates ClientExternalIdTest to use fineract-client-feign
- Replaces RestAssured API calls with Feign client
- Fixes obligeedetails endpoint handling for JSON array response
- Updates OpenAPI schema accordingly
@Dpk376 Dpk376 force-pushed the feature/FINERACT-2441-feign-migration-clientexternalid branch from 0ac8222 to aa77864 Compare March 27, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants